package com.huixin.zhang.core.page;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

/**
 * 分页请求
 * @author Toltech
 * @date Jan 12, 2019
 */
public class PageRequest {
	/**
	 * 当前页码
	 */
	private Integer pageNum = 1;
	/**
	 * 每页数量
	 */
	private Integer pageSize = 10;
	/**
	 * 查询参数
	 */
	private JSONObject params = new JSONObject();
	private List<Map<String,Object>> columns;

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public JSONObject getParams() {
		return params;
	}

	public void setParams(JSONObject params) {
		this.params = params;
	}

	public Object getParam(String key) {
		return getParams().get(key);
	}

	public String getStringParam(String key) {
		return getParams().getString(key);
	}

	public List<Map<String,Object>> getColumns() {
		return columns;
	}

	public void setColumns(List<Map<String,Object>> columns){
		this.columns = columns;
	}
}
